import * as types from './mutation-types';
import { userStorageName } from 'common/js/config';
import { getLocalStorage } from 'common/js/dom';

const mutations = {
	[types.SET_USER](state, obj) {
		getLocalStorage(userStorageName, obj);
		state.User = obj;
	},
	[types.SET_ROLE](state, obj) {
		state.Role = obj;
	}
}

export default mutations